package itesm.coler.data;

import java.util.ArrayList;
import java.util.Collection;

import javax.sql.RowSet;

import itesm.coler.models.MessageCategory;

public interface MessageCategoryDAO {
	/**
     * Returns the MessageCategory from the database matching the given MessageCategoryId, otherwise null.
     * @param MessageCategoryId The MessageCategoryId of the MessageCategory to be returned.
     * @return The MessageCategory from the database matching the given MessageCategoryId, otherwise null.
     * @throws DAOException If something fails at database level.
     */
	 public MessageCategory findMessageCategoryByMessageCategoryId(String messageCategoryId) throws DAOException;

	 
	/**
     * Returns the MessageCategory from the database matching the given MessageCategoryName, otherwise null.
     * @param MessageCategoryname The MessageCategoryName of the MessageCategory to be returned.
     * @return The MessageCategory from the database matching the given MessageCategoryName, otherwise null.
     * @throws DAOException If something fails at database level.
     */
	 public MessageCategory findMessageCategoryByMessageCategoryName(String messageCategoryName) throws DAOException;
	 
	    
    /**
     * Returns a list of all MessageCategories from the database ordered by MessageCategory ID. The list is never null and
     * is empty when the database does not contain any MessageCategory.
     * @return A list of all MessageCategories from the database ordered by MessageCategory ID.
     * @throws DAOException If something fails at database level.
     */
    public ArrayList<MessageCategory> findAll() throws DAOException;

   
	 /**
     * Create the given MessageCategory in the database. The MessageCategoryname must be unique, otherwise it will throw
     * IllegalArgumentException.  
     * @param MessageCategory The MessageCategory to be created in the database.
     * @throws IllegalArgumentException If the MessageCategoryname exists
     * @throws DAOException If something fails at database level.
     */
	 // public int insertMessageCategory(MessageCategory messageCategory) throws IllegalArgumentException, DAOException;
	  
	  
	  /**
	     * Update the given MessageCategory in the database. The MessageCategoryname must not be null, otherwise it will throw
	     * IllegalArgumentException.
	     * @param MessageCategory The MessageCategory to be updated in the database.
	     * @throws IllegalArgumentException If the MessageCategoryname is null.
	     * @throws DAOException If something fails at database level.
	     */
	 // public boolean updateMessageCategory(MessageCategory messageCategory) throws DAOException;
	  
	  /**
	     * Delete the given MessageCategory from the database. 
	     * @param MessageCategory The MessageCategory to be deleted from the database.
	     * @throws DAOException If something fails at database level.
	     */
	  //public boolean deleteMessageCategory(String messageCategoryName) throws DAOException;
	  
	  /**
	     * Change the MessageCategory's active status
	     * @param MessageCategoryname The MessageCategoryName which is to be checked in the database.
	     * @param status The active status: 1 active, 0 not active
	     * @throws DAOException If something fails at database level.
	     */
	 // public boolean updateMessageCategoryActiveStatus(String messageCategoryName, boolean status) throws DAOException;
	  
	  /**
	     * Change the MessageCategory's active status
	     * @param MessageCategoryname The MessageCategoryName which is to be checked in the database.
	     * @param status The online status: 1 on line, 0 not on line
	     * @throws DAOException If something fails at database level.
	     */
	 // public boolean updateMessageCategoryOnlineStatus(String MessageCategoryName, boolean status) throws DAOException;

	  public RowSet selectMessageCategoriesRS();
	  public Collection<MessageCategory> selectMessageCategoriesTO();
}
